#ifndef _MYRSA_H_
#define _MYRSA_H_

#include <openssl/rsa.h>

char * publicEncrypt(char * from, RSA * rsa);
char * privateEncrypt(unsigned char *from, RSA *key);
char * publicDecrypt(char * from, RSA * rsa);
char * privateDecrypt(char * from, RSA * rsa);
int RSA_bn2str(const BIGNUM *bn,char *s);
int RSA_key2str(const RSA *key,char *s);
RSA * RSA_str2key(const char *s);
int exportPublicKey(const RSA *key,const char *fileName);
int exportPrivateKey(const RSA * key,char *fileName,char *pass);
int importPublicKey(const char *fileName,RSA **key);
int importPrivateKey(const char *fileName, RSA **key, const char *pass);


#endif
